package com.fable.web.controller;


import com.fable.common.enums.BusiErrCode;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;


@Controller
public class ErrorController {
    @RequestMapping("/error")
    public ModelAndView error(HttpServletRequest request) {
        ModelAndView mv = new ModelAndView();

        mv.addObject("msg", BusiErrCode.SERVER_BUSY.msg());
        mv.setViewName("/error");
        return mv;
    }

    @RequestMapping("/notFound")
    public String notFound(HttpServletRequest request) {
        return "/404";
    }
}
